package cn.imnaer.service.rest.view.model;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import cn.imnaer.service.persistence.model.Tribal;

/**
 * Created by Administrator on 2015/8/1.
 */
public class TribalResponse implements Serializable {
    private String tribalId;
    private String tribalName;
    private String image;
    private String icon;
    private Boolean isLike = false;


    public TribalResponse parse(Tribal tribal) {
        this.tribalId = tribal.getTribalId();
        this.tribalName = tribal.getTribalName();
        this.image = tribal.getImage();
        this.icon = tribal.getIcon();
        return this;
    }

    public static List<TribalResponse> parseList(List<Tribal> tribals) {
        List<TribalResponse> result = new ArrayList<>();
        for (Tribal tribal : tribals) {
            TribalResponse target = new TribalResponse().parse(tribal);
            result.add(target);
        }
        return result;
    }

    public String getTribalId() {
        return tribalId;
    }

    public void setTribalId(String tribalId) {
        this.tribalId = tribalId;
    }

    public String getTribalName() {
        return tribalName;
    }

    public void setTribalName(String tribalName) {
        this.tribalName = tribalName;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public Boolean getIsLike() {
        return isLike;
    }

    public void setIsLike(Boolean isLike) {
        this.isLike = isLike;
    }
}
